<?php

/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model app\models\LoginForm */

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;

$this->title = '会员登录';
$this->params['breadcrumbs'][] = $this->title;
?>
<section class="login-content">
  <!--div class="logo">
    <h1 style='color:#ff8800;text-align:center;border-bottom:3px solid #ff8800;'>贝 恩 资 本</h1>
    <h1 style='color:#ff8800;text-align:center;'>BainCapital</h1>
  </div-->
<div class="login-box">

  <div class="login-form">
  <?php $form = ActiveForm::begin()?>
    <h3 class="login-head"><i class="fa fa-lg fa-fw fa-user"></i>登 录</h3>
    <?php
      if(isset($tip)&&$tip===true){
        if($model->hasErrors()){
    ?>
          <div class="alert alert-danger" role="alert">
            <?php
                foreach($model->getErrors("") as $key=>$value){
                  echo $value."<br>";
                }
            ?>
          </div>
    <?php
        }else{
        }
      }
    ?>
    <div class="form-group">
      <?= $form->field($model, 'username')->textInput(['autofocus' => true,'placeholder'=>'用户名']) ?>
    </div>
    <div class="form-group">
      <?= $form->field($model, 'password')->passwordInput(['placeholder'=>'密码']) ?>
    </div>

    <div class="form-group">
      <div class="utility">
        <div class="animated-checkbox">
          <label class="semibold-text">
            <?=Html::activeCheckbox($model, 'rememberMe',['label' => '<span class="label-text">保持登录状态</span>']);?>
          </label>
        </div>
        <p class="semibold-text"><a data-toggle="flip">忘记密码?</a></p>
      </div>
    </div>
    <div class="form-group btn-container">
      <?=Html::hiddenInput('login-submit', '1')?>
      <?= Html::submitButton('登 录<i class="fa fa-sign-in fa-lg"></i>', ['class' => 'btn btn-warning btn-block']) ?>
    </div>
    <?php ActiveForm::end(); ?>
  </div>
  <div class="forget-form">
    <?php $form = ActiveForm::begin();?>
      <h3 class="login-head"><i class="fa fa-lg fa-fw fa-lock"></i>忘记密码 ?</h3>
      <div class="form-group">
        <?= $form->field($model, 'username')->textInput(['autofocus' => true,'placeholder'=>'会员名']) ?>
      </div>
      <div class="form-group btn-container">
        <?=Html::hiddenInput('resetpw-submit', '1')?>
        <?= Html::submitButton('重设<i class="fa fa-unlock fa-lg"></i>', ['class' => 'btn btn-warning btn-block']) ?>
      </div>
      <div class="form-group mt-20">
        <p class="semibold-text mb-0"><a data-toggle="flip"><i class="fa fa-angle-left fa-fw"></i> 返回登录页面</a></p>
      </div>
      <?php ActiveForm::end(); ?>
  </div>
</div>
<!-- footer content -->
<footer class="footer">
  <div class="container" style="text-align:center;color:#fff;margin-top:50px;font-size:12px;">
    <br>
    <?=$this->context->sysConfig->site_reg_id?>
    <br>
    Copyright © 2017 贝恩资本 版权所有
  </div>
</footer>
<!-- /footer content -->
</section>
